package te;

import cn.kgc.disk.Dao.UsbDisk;
import cn.kgc.disk.service.BeanFactory1;
import org.junit.Test;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.ArrayList;
import java.util.List;

public class testUtils {
    @Test
    public void test1(){
        ApplicationContext context=new ClassPathXmlApplicationContext("diskConfig.xml");
        UsbDisk usbDisk=(UsbDisk)context.getBean("disk");
        usbDisk.read();
        List list=new ArrayList();
        String [] strings=new String[10];
//        usbDisk.write();
//        usbDisk.mapthing();
//        usbDisk.sad();

    }
    @Test
    public void test2(){
        ApplicationContext context=new ClassPathXmlApplicationContext("diskConfig.xml");
        //BeanFactory1 b= (BeanFactory1) context.getBean(BeanFactory1.class);
        BeanFactory1 b= (BeanFactory1) context.getBean("diskFac");
        b.factory();

    }
}
